package sw6.admin.gui.logic;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * This class is a data container. It contains information about a given menu.
 * A menu has a real name, description, packageName (the name of application that the menu belongs to)
 * The menu also has a list of settings and sub-menues that belongs to the menu
 * @author sw6b
 *
 */
public class Menu implements Serializable{

	private static final long serialVersionUID = 7098417464949515462L;
	ArrayList<Menu> mMenus = new ArrayList<Menu>();
	ArrayList<Setting> mSettings = new ArrayList<Setting>();
	String mRealName;
	String mDescription;
	String mPackageName;
	
	public Menu(String realName, String description, String packageName){
		mPackageName = packageName;
		mRealName = realName;
		mDescription = description;
	}
	
	public ArrayList<Menu> getMenus() {
		return mMenus;
	}
	
	public ArrayList<Setting> getSettings() {
		return mSettings;
	}
	
	public String getRealName(){
		return mRealName;
	}
	
	public String getPackageName(){
		return mPackageName;
	}
	
	public String getDescription(){
		return mDescription;
	}
	
	public void addMenu(Menu menu) {
		mMenus.add(menu);
	}
	
	public void addSetting(Setting setting){
		mSettings.add(setting);
	}
	
}
